package com.eclipse.e20200122_反射.ketang;

public class Person {

	private String name = "person";

	public int age = 0;

	public Person() {
		System.out.println("     Person默认构造方法");
	}

	public Person(String name, int age) {
		this.name = name;
		this.age = age;
		System.out.println("     Person带参数的构造方法");
	}

  	private void print() {
		System.out.println("     print() ");
	}

	public void print(String test) {
		System.out.println("     print(String test) " + test);
	}

	private void print(int test) {
		System.out.println("     print(int test) " + test);
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}
}

/**
 * 子类
 */
class Student extends Person {

	private int score = 0;

	public Student() {
		System.out.println("     Student默认的构造方法");
	}

	private Student(String name) {
		System.out.println("     Student带参数的构造方法");
	}

	private void print(double test) {
		System.out.println("     print(double test) " + test);
	}

	public int getScore() {
		return score;
	}

	public void setScore(int score) {
		this.score = score;
	}

}
